/**
  ******************************************************************************
  * @file    bsp_led.h
  * @author  zwx
  * @version V1.0.0
  * @date    2019-09-21
  * @brief
  ******************************************************************************
  */
#ifndef __BSP_LED_H__
#define __BSP_LED_H__

#include "stm32f10x.h"

/* Exported define -----------------------------------------------------------*/
enum KEY_NUM
{
    LED_POWER = 0,
    LED_WORK = 1,
    LED_FAULT = 2,
};

/* Exported typedef ----------------------------------------------------------*/
#define LED_POWER_PIN          GPIO_Pin_15
#define LED_POWER_PORT         GPIOB
#define LED_WORK_PIN           GPIO_Pin_14
#define LED_WORK_PORT          GPIOB
#define LED_FAULT_PIN          GPIO_Pin_13
#define LED_FAULT_PORT         GPIOB

#define LED_RCC_INIT()         RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE)
/* Exported variables --------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
void bsp_ledInit(void);
void led_on(uint8_t n);
void led_off(uint8_t n);
void led_toggle(uint8_t n);

#endif

/*****************************  End   ******************************************/


